<template>

  <div>

    <el-row >
           <el-col :span="24">
            <el-form   class="demo-form-inline">
              <el-form-item >
                <el-input  placeholder="请输入融资企业名称" v-model="financeName" clearable style="float:left;width:300px;margin-left:200px"></el-input>
                <el-input  placeholder="请输入核心企业名称" v-model="coreName" clearable style="float:left;width:300px;margin-left:10px"></el-input>
                  <el-button icon="el-icon-search"  type="primary"  style="float:left" @click="doSearchBtn"></el-button>
                  
               </el-form-item>
                 </el-form>
                 
           </el-col>
    </el-row>

    <el-row>
      <el-col :span="24">
        <el-table
    :data="tableData"
    border
    style="width: auto;">
    <el-table-column
      type="index"
      label="序号"
      align="center"
      width="50"
    ></el-table-column>
    <el-table-column
      label="标的编码"
      align="center"
      >
    <template slot-scope="scope">
        {{ scope.row.tenderId }}
        </template>
    </el-table-column>
    <el-table-column
      prop="financeName"
      label="融资企业名称"
      align="center">
    </el-table-column>
    <el-table-column
      prop="coreName"
      label="核心企业名称"
      align="center">
    </el-table-column>
    <el-table-column
      prop="allFinancingAmount"
      label="融资金额"
      align="center">
    </el-table-column>
    <el-table-column
      prop="nowFinancingAmount"
      label="已融资金额"
      align="center">
    </el-table-column>
    <el-table-column
      prop="financingLimit"
      label="融资期限"
      align="center">
    </el-table-column>
    
    <el-table-column
      prop="annualizedInterestRate"
      label="年化利率"
      align="center">
    </el-table-column>
    <el-table-column
      prop="financingProgress"
      label="融资进度"
      align="center">
    </el-table-column>
    <el-table-column
      label="背书凭证"
      align="center">
      <template slot-scope="scope">
        <img :src="scope.row.tenderImages" style="width:120px;heigth:150px"/>
      </template>
    </el-table-column>
    <el-table-column
      prop="tenderIssuanceTime"
      label="发标时间"
      sortable
      align="center">
    </el-table-column>
    <el-table-column
      prop="billingTime"
      label="起息时间"
      align="center">
    </el-table-column>
    <el-table-column
      prop="remainingRepaymentTime"
      label="剩余还款时间"
      align="center">
    </el-table-column>
    <el-table-column
      prop="repaymentAmount"
      label="待还金额"
      align="center">
    </el-table-column>
    <el-table-column
      prop="finalRepaymentTime"
      label="最终还款时间"
      align="center">
    </el-table-column>
    <el-table-column
        prop="repaymentStatus"
      label="还款状态"
      align="center">
    </el-table-column>
    <el-table-column
      prop="finishedStatus"
      label="完结状态"
      align="center">
    </el-table-column>
  </el-table>
      </el-col>
    </el-row>

    <el-row>
           <el-col :span="24" :offset="6">
            <el-pagination
              
              background
              @size-change="sizeChange"
              @current-change="currentChange"
              :current-page="pageNum"
              :page-sizes="[10, 20, 30]"
              :page-size="pageSize"
              layout="total, sizes, prev, pager, next, jumper"
              :total="total">
            </el-pagination>
            </el-col>
        </el-row>


  </div>


</template>

<script>
export default {
        data(){
            return{
                tableData:[],
                pageNum:1,
                pageSize:10,
                total:0,
                auditResult:'',
                financeName:'',
                coreName:'',
                options:[
                    {value:'1',label:'通过'},
                    {value:'2',label:'未通过'},
                ]

            }
        },
        created(){
            this.getAuditRecord()
        },
        methods:{
            
            doSelect(e){
                this.auditResult = e
                this.pageNum = 1
                this.getAuditRecord()
            },
            doSearchBtn(){
                this.pageNum = 1
                this.getAuditRecord()
            },
            currentChange(p){
                this.pageNum=p
                this.getAuditRecord()
             },
            sizeChange(p){
                this.pageNum=1
                this.pageSize=p
                this.getAuditRecord()
            },
            getAuditRecord(){
                let param ={}
                param.pageNum = this.pageNum
                param.pageSize = this.pageSize
                let data = {}
                data.coreName = this.coreName
                data.financeName = this.financeName
                param.data = data
                this.$axios.post('api/tenderAudit/queryTenderList',param,{headers:{'jwt':localStorage.getItem('jwt')}})
                .then(res=>{
                    
                    let pageDate = res.data.data
                    this.tableData = pageDate.list
                    this.pageNum = pageDate.pageNum
                    this.pageSize = pageDate.pageSize
                    this.total = pageDate.total
                })
            }
        }
}
</script>

<style scoped>

</style>